.post-detail-page {
  padding: 24px;

  .page-header {
    margin-bottom: 20px;
  }

  .post-detail-content {
    margin-bottom: 24px;
  }

  // 帖子内容卡片
  .post-content-card {
    .post-header {
      .post-meta {
        margin: 16px 0;
        color: rgba(0, 0, 0, 0.45);
      }

      .post-tags {
        margin-top: 12px;
        
        .ant-tag {
          margin-bottom: 8px;
        }
      }

      h2 {
        margin-bottom: 8px;
        color: rgba(0, 0, 0, 0.88);
      }
    }

    .post-body {
      min-height: 300px;
      line-height: 1.8;
      font-size: 15px;

      .post-text-content {
        margin-bottom: 24px;

        p {
          margin-bottom: 12px;
          color: rgba(0, 0, 0, 0.75);
          line-height: 1.8;
        }
      }

      // 图片展示区域
      .post-images {
        margin-top: 24px;
        margin-bottom: 16px;

        .post-image {
          width: 100%;
          height: auto;
          border-radius: 8px;
          object-fit: cover;
          cursor: pointer;
          transition: all 0.3s ease;

          &:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
          }
        }

        // 图片占位符
        .image-placeholder {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 100%;
          height: 200px;
          background: #f5f5f5;
          border-radius: 8px;
        }

        // 单张图片样式
        .ant-col:only-child {
          .post-image {
            max-height: 500px;
            object-fit: contain;
          }
        }

        // 两张图片样式
        .ant-row:has(.ant-col:nth-child(2):last-child) {
          .post-image {
            height: 300px;
            object-fit: cover;
          }
        }

        // 三张及以上图片样式
        .ant-row:has(.ant-col:nth-child(3)) {
          .post-image {
            height: 200px;
            object-fit: cover;
          }
        }
      }

      h4 {
        margin-top: 24px;
        margin-bottom: 16px;
        color: rgba(0, 0, 0, 0.88);
        font-size: 18px;
      }

      p {
        margin-bottom: 12px;
        color: rgba(0, 0, 0, 0.75);
      }
    }

    .post-footer {
      display: flex;
      align-items: center;
      padding-top: 8px;

      span {
        display: flex;
        align-items: center;
        gap: 6px;
        color: rgba(0, 0, 0, 0.45);
        font-size: 14px;
      }
    }
  }

  // 评论区卡片
  .comments-card {
    position: sticky;
    top: 24px;
    
    .comment-input-section {
      margin-bottom: 16px;

      .ant-input {
        resize: none;
      }
    }

    .comments-list {
      max-height: 600px;
      overflow-y: auto;

      .ant-list-item {
        border-bottom: 1px solid #f0f0f0;
        padding: 16px 0;

        &:last-child {
          border-bottom: none;
        }

        .ant-list-item-meta-description {
          p {
            margin-bottom: 4px;
          }
        }
      }

      // 滚动条样式
      &::-webkit-scrollbar {
        width: 6px;
      }

      &::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
      }

      &::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;

        &:hover {
          background: #a8a8a8;
        }
      }
    }

    .ant-card-head {
      font-weight: 600;
      color: rgba(0, 0, 0, 0.88);
    }
  }

  // 推荐帖子区域
  .recommended-posts-section {
    margin-top: 24px;

    .recommended-posts-card {
      .ant-card-head-title {
        font-size: 18px;
        font-weight: 600;
        color: rgba(0, 0, 0, 0.88);
      }

      .recommended-post-item {
        height: 100%;
        transition: all 0.3s ease;
        border-radius: 8px;
        overflow: hidden;

        &:hover {
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
          transform: translateY(-2px);
        }

        .recommended-post-cover {
          position: relative;
          width: 100%;
          height: 160px;
          overflow: hidden;

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
          }

          .image-count-badge {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 12px;
          }
        }

        &:hover .recommended-post-cover img {
          transform: scale(1.05);
        }

        .ant-card-body {
          padding: 16px;
        }

        h5 {
          margin-bottom: 12px;
          color: rgba(0, 0, 0, 0.88);
        }

        .recommended-post-meta {
          margin: 12px 0;
        }

        .recommended-post-tags {
          margin-top: 12px;
          
          .ant-tag {
            margin-bottom: 4px;
          }
        }
      }
    }
  }
}

// 加载状态
.post-detail-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

// 空状态
.post-detail-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

// 响应式布局
@media (max-width: 992px) {
  .post-detail-page {
    padding: 16px;

    .comments-card {
      position: relative;
      top: 0;
      margin-top: 16px;
    }

    .post-detail-content {
      .ant-col {
        margin-bottom: 16px;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }
}

@media (max-width: 576px) {
  .post-detail-page {
    padding: 12px;

    .post-content-card {
      .post-body {
        font-size: 14px;
      }
    }

    .recommended-posts-section {
      .recommended-post-item {
        .ant-card-body {
          padding: 12px;
        }
      }
    }
  }
}

